package w13;

import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;

public class Demo4_2 {
	public static void main(String[] args) throws IOException {
		FileOutputStream fout = new FileOutputStream("e:\\123.txt");
		byte[] bytes = "Asdfhksd写入成功jfhksdf".getBytes();
//		System.out.println(Arrays.toString(bytes));
		// 将字符串转化为字节数组。
		fout.write(bytes);
		// 一次性写入字节数组
		System.out.println("写入成功!");
	}

}
